Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor NimBLEExtAdvertising #759

Merged
merged 3 commits into from
Nov 28, 2024
Merged

Refactor NimBLEExtAdvertising #759

merged 3 commits into from
Nov 28, 2024

Conversation

h2zero
Copy link
Owner

@h2zero h2zero commented Nov 25, 2024

  • General code cleanup
  • NimBLEExtAdvertisement : All functions that set data now return bool, true = success.
  • Added new method, NimBLEExtAdvertisement::removeData, which will remove the data of the specified type from the advertisement.
  • Added new method, NimBLEExtAdvertisement::addServiceUUID, which will append to the service uuids advertised.
  • Added new method, NimBLEExtAdvertisement::removeServiceUUID, which will remove the service from the uuids advertised.
  • Added new method, NimBLEExtAdvertisement::removeServices, which will remove all service uuids advertised.
  • Added overloads for NimBLEExtAdvertisement::setServiceData with the parameters const NimBLEUUID& uuid, const uint8_t* data, size_t length and const NimBLEUUID& uuid, const std::vector<uint8_t>& data.
  • Added new method, NimBLEExtAdvertisement::getDataLocation, which returns the location in the advertisment data of the type requested in parameter uint8_t type.
  • Added new method, toString which returns a Hex string representation of the advertisement data.
  • Added new method NimBLEScan::setScanPhy to enable/disable the PHY's to scan on.
  • Added new method NimBLEScan::setScanPeriod which will allow for setting a scan restart timer in the controller.
  • Updated NimBLEScan::start to allow the command to be sent with updated parameters if already scanning.
  • Added extended scan example.
  • Removed storing and restarting of the scan on host reset as it is more appropriate to call the scanEnded callback instead.
  • Added NimBLEDevice::setDefaultPhy which will set the default preferred PHY for all connections.
  • Added NimBLEClient::updatePhy to request a PHY change with a peer.
  • Added NimBLEClient::getPhy to read the current connection PHY setting.
  • Added NimBLEServer::updatePhy to request a PHY change with a peer.
  • Added NimBLEServer::getPhy to read the PHY of a peer connection.
  • Added callbacks:
    • NimBLEClientCallbacks::onPhyUpdate
    • NimBLEServerCallbacks::onPhyUpdate
      Which are called when the PHY update is complete.

@h2zero h2zero force-pushed the refactor-extadvertising branch 5 times, most recently from d69aa76 to 7a1d059 Compare November 28, 2024 19:55
h2zero and others added 3 commits November 28, 2024 14:20
* General code cleanup
* `NimBLEExtAdvertisement` : All functions that set data now return `bool`, true = success.
* Added new method, `NimBLEExtAdvertisement::removeData`, which will remove the data of the specified type from the advertisement.
* Added new method, `NimBLEExtAdvertisement::addServiceUUID`, which will append to the service uuids advertised.
* Added new method, `NimBLEExtAdvertisement::removeServiceUUID`, which will remove the service from the uuids advertised.
* Added new method, `NimBLEExtAdvertisement::removeServices`, which will remove all service uuids advertised.
* Added overloads for `NimBLEExtAdvertisement::setServiceData` with the parameters `const NimBLEUUID& uuid, const uint8_t* data, size_t length` and
  `const NimBLEUUID& uuid, const std::vector<uint8_t>& data`.
* Added new method, `NimBLEExtAdvertisement::getDataLocation`, which returns the location in the advertisment data of the type requested in parameter `uint8_t type`.
* Added new method, `toString` which returns a Hex string representation of the advertisement data.
* Added new method `NimBLEScan::setScanPhy` to enable/disable the PHY's to scan on.
* Added new method `NimBLEScan::setScanPeriod` which will allow for setting a scan restart timer in the controller.
* Updated `NimBLEScan::start` to allow the command to be sent with updated parameters if already scanning.
* Added extended scan example.
* Removed storing and restarting of the scan on host reset as it is more appropriate to call the scanEnded callback instead.
* Added `NimBLEDevice::setDefaultPhy` which will set the default preferred PHY for all connections.
* Added `NimBLEClient::updatePhy` to request a PHY change with a peer.
* Added `NimBLEClient::getPhy` to read the current connection PHY setting.
* Added `NimBLEServer::updatePhy` to request a PHY change with a peer.
* Added `NimBLEServer::getPhy` to read the PHY of a peer connection.
* Added callbacks:
* - `NimBLEClientCallbacks::onPhyUpdate`
* - `NimBLEServerCallbacks::onPhyUpdate`
 Which are called when the PHY update is complete.
@h2zero h2zero force-pushed the refactor-extadvertising branch from 7a1d059 to fbe20f1 Compare November 28, 2024 21:26
@h2zero h2zero merged commit 3dfada4 into master Nov 28, 2024
31 checks passed
@h2zero h2zero deleted the refactor-extadvertising branch November 28, 2024 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant